
Public Class MsgDirectionFieldInfo
	Inherits FieldInfo

	Public Overrides ReadOnly Property ClrType() As Type
		Get
		Return GetType(Char)
		End Get
	End Property
	Public Overrides ReadOnly Property FixType() As FixDataType
		Get
		Return FixDataType.Char
		End Get
	End Property
	Public Overrides ReadOnly Property TagNumber() As Integer
		Get
		Return 385
		End Get
	End Property
	Public Overrides ReadOnly Property FieldName() As String
		Get
		Return "MsgDirection"
		End Get
	End Property

	Private ReadOnly s_ValidValues As new ObjectModel.ReadOnlyCollection(Of Char)( New Char(){"S"c,"R"c})

Public Const [Send] As Char = "S"c
Public Const [Receive] As Char = "R"c

Public Function GetValidValues() As ObjectModel.ReadOnlyCollection(Of Char)
Return s_ValidValues
End Function

Public Function IsDefined(value As Char) As Boolean
Return s_ValidValues.Contains(value)
End Function

Public Function GetName(ByVal value As Char) As String
Select Case value
Case "S"c : Return "Send"
Case "R"c : Return "Receive"
Case Else : Throw New ArgumentOutOfRangeException("value")
End Select
End Function

Public Function GetValue(ByVal name As String) As Char
Select Case name
Case "Send" : Return "S"c
Case "Receive" : Return "R"c
Case Else : Throw New ArgumentOutOfRangeException("name")
End Select
End Function



End Class


